<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>USDT日志</title>
    <link rel="stylesheet" href="/layui-2.4.2/src/css/layui.css">
    <script type="text/javascript" src="/jquery/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="/layui-2.4.2/src/layui.js"></script>
</head>
<body>
<div>
    <div class="layui-row">
        <div class="layui-form">
            <div class="layui-form-item">
                <label class="layui-form-label">手机号:</label>
                <div class="layui-input-inline">
                    <input type="text" id="mobile" name="mobile" required lay-verify="required"
                           placeholder="请输入手机号"
                           autocomplete="off" class="layui-input">
                </div>
                <label class="layui-form-label">账户id:</label>
                <div class="layui-input-inline">
                    <input type="text" id="accountId" name="accountId" required lay-verify="required"
                           placeholder="请输入账户id"
                           autocomplete="off" class="layui-input">
                </div>
                <label class="layui-form-label">类型</label>
                <div class="layui-input-inline">
                    <select name="typeId" class="typeId" >
                        <option value="">全部</option>
                        <option value="1">提现</option>
                        <option value="2">充值</option>
                        <option value="3">fmt兑换usdt</option>
                        <option value="4">usdt兑换fmt</option>
                        <option value="5">USDT兑换FMT手续费</option>
                        <option value="6">USDT提现手续费</option>
                    </select>
                </div>
                <label class="layui-form-label">创建时间:</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" id="flow-year" name="createTime" placeholder="选择日期"
                           style="width: 55% ">
                </div>

            </div>
            <div class="layui-form-item">
                <button class="layui-btn" id="search">搜索</button>
            </div>


        </div>
    </div>

</div>
<div class="layui-row">
    <table id="user_list_view" lay-filter="user_filter">

    </table>
</div>


</body>


<script>
    layui.use('laydate', function () {
        var laydate = layui.laydate;
        //按日查询
        laydate.render({
            elem: '#flow-year'
            , max: 0
            , format: 'yyyy-MM-dd'
            , done: function (value, date, endDate) {
                flowYmd = value;
            }
        });
    });
    layui.use(['element', 'table', 'upload', 'laytpl', 'form'], function () {
        var table = layui.table;
        table.render({
            elem: '#user_list_view',
            url: '/usdtLog/queryUsdtLogList',
            page: true,
            size: 10,
            limits: [10, 20, 50, 100],
            cols: [
                [
                    {field: 'accountId', title: '用户id'},

                    {field: 'mobile', title: '手机号'},
                    {field: 'typeId', title: '类型' ,templet:function(d){
                            if (d.typeId === 1) return '提现';
                            if (d.typeId === 2) return '充值';
                            if (d.typeId === 3) return 'fmt兑换usdt';
                            if (d.typeId === 4) return 'usdt兑换fmt';
                            if (d.typeId === 5) return 'USDT兑换FMT手续费';
                            if (d.typeId === 6) return 'USDT提现手续费';
                        }},
                    {field: 'usdtValue', width:140, title: '金额(USDT)'},
                    {
                        field: 'status',  title: '状态', templet: function (d) {
                            if (d.status === 0) return '待审核';
                            if (d.status === 1) return '提现中';
                            if (d.status === 2) return '成功';
                            if (d.status === 3) return '失败';
                            if (d.status === 4) return '提现失败,请联系管理员';
                        }
                    },
                    {field: 'createTime',width:140,  title: '创建时间'}
                ]
            ],
            response: {
                status: 'errorCode',
                countName: 'total',
                dataName: 'data'
            }
        });
        $("#search").on('click', function () {
            table.reload('user_list_view', {
                url: '/usdtLog/queryUsdtLogList',
                where: {
                    createTime: $('input[name="createTime"]').val(),
                    mobile: $('#mobile').val(),
                    typeId: $('.typeId').val(),
                    accountId: $('#accountId').val()
                }
            });
        });
    });

</script>

</html>